
var {createProxyMiddleware} = require('http-proxy-middleware');

// const api="https://pcg-adminapi.77s.vip"
const api = 'https://uat-pcgadmin.77s.vip'
module.exports = (app)=>{
	app.use('/api',createProxyMiddleware({
		target: api, // pre 预发布环境接口
		// target: uatApi, // uat 开发环境接口
		// target: api, // 正式接口
	  secure:false, // true/false, if you want to verify the SSL Certs
	  changeOrigin: true, // needed for virtual hosted sites
	  pathRewrite:{
	  	'^/api':'/'
	  }
	}))

}



